package com.bjsdzk.collector.timer;

import io.vertx.core.Vertx;
import io.vertx.core.eventbus.EventBus;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.bjsdzk.collector.constant.Constant;

/**
 * Created by zealdin on 2018/9/1.
 */
public class MyJob implements org.quartz.Job {
	private static Logger logger = LoggerFactory.getLogger(MyJob.class);
    public MyJob() {

    }
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        logger.debug("MyJob is executing");

        EventBus eventBus = (EventBus) context.getMergedJobDataMap().get("eventbus");

        eventBus.publish("readJob", Constant.CMD_106_READ);
    }
}
